<template>
	<view>
		<button type="default" @tap="toast1Tap">点击弹出默认toast</button>
		<button type="default" @tap="toast2Tap">点击弹出设置duration的toast</button>
		<button type="default" @tap="toast3Tap">点击弹出显示loading的toast</button>
		<button type="default" @tap="toast4Tap">点击弹出显示自定义图片的toast</button>
		<button type="default" @tap="hideToast">点击隐藏toast</button>
	</view>
</template>
<script>
export default {
	data() {
		return {};
	},
	methods: {
		toast1Tap: function() {
			uni.showToast({
				title: '默认'
			});
		},
		toast2Tap: function() {
			uni.showToast({
				title: 'duration 3000',
				duration: 3000
			});
		},
		toast3Tap: function() {
			uni.showToast({
				title: 'loading',
				icon: 'loading',
				duration: 5000
			});
		},
		toast4Tap: function() {
			uni.showToast({
				title: '登录失败',
				image: '/static/wode/错误.png'
			});
		},
		hideToast: function() {
			uni.hideToast();
		}
	}
};
</script>